-
Notifications
You must be signed in to change notification settings - Fork 628
Remove support for sx
from Checkbox
component
#6654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2900240 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the deprecated sx
prop support from the Checkbox
component as part of Primer React's migration away from styled-system. The change removes the sx
prop from the component interface, eliminates the conditional rendering logic that wrapped the checkbox in a Box
component when sx
was present, and updates associated documentation and tests.
Key Changes:
- Removed
sx
prop fromCheckboxProps
interface and component implementation - Simplified component rendering by removing conditional
Box
wrapper logic - Updated Storybook configuration and documentation to reflect the removed prop
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
packages/react/src/Checkbox/Checkbox.tsx | Removed SxProp type, Box import, sx parameter, and conditional rendering logic |
packages/react/src/Checkbox/Checkbox.stories.tsx | Removed sx from excluded control keys in Storybook configuration |
packages/react/src/Checkbox/Checkbox.docs.json | Removed sx prop documentation entry |
.changeset/tasty-cheetahs-pay.md | Added changeset documenting the breaking change |
Note: make sure to run integration checks 🙏 |
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/1928 |
🟢 ci completed with status |
Closes https://github.com/github/primer/issues/5759
Current
sx
usage: 2✅
sx
usages are only in repos other than github-ui; those usages have been added to the tracking issueChangelog
Removed
Remove support for
sx
from theCheckbox
component, and associated stories, docs, and testsRollout strategy
We are using the
@primer/styled-react
component to mitigate removingsx
usage. We will make sure usage is updated upstream before merging.Merge checklist